//
//  WLHomeActivityBannerCell.swift
//  WalkerLove
//
//  Created by Z on 2020/4/18.
//  Copyright © 2020 Carlson. All rights reserved.
//  活动banner

import UIKit

class WLHomeActivityBannerCell: UITableViewCell {

    var banner: ScrollerView?
    var datas: [String] {
        set(m){
            banner?.loadDatas(m)
        }
        get{
            return [String]()
        }
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        initSubviews()
    }

    func initSubviews() {
        self.backgroundColor = UIColor.clear
        contentView.backgroundColor = UIColor.clear
        
        banner = ScrollerView(frame: CGRect.zero, type: .image, dir: .hor)
        contentView.addSubview(banner!)
                
        banner?.snp.makeConstraints({
            $0.left.equalTo(15)
            $0.right.equalTo(-15)
            $0.top.bottom.equalTo(0)
        })
    }
}
